
#ifndef __STARROBOT_BRINGUP_H_
#define __STARROBOT_BRINGUP_H_
// sudo apt-get install ros-kinetic-serial ->kinetic
// sudo apt-get install ros-melodic-serial ->melodic
// rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.1, y: 0, z: 0}, angular: {x: 0, y: 0, z: -0.5}}'
// sudo usermod -aG　dialout wsh

#include "ros/ros.h"
#include <iostream>
#include <string.h>
#include <string> 
#include <iostream>
#include <math.h>
#include <stdlib.h>       
#include <unistd.h>      
#include <sys/types.h>
#include <sys/stat.h>
#include <serial/serial.h>
#include <fcntl.h>          
#include <stdbool.h>
#include <tf/transform_broadcaster.h>

#include <std_msgs/String.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/Pose.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>

#include <geometry_msgs/Vector3.h>
#include <geometry_msgs/Twist.h>
#include <starrobot_msgs/Battery.h>
#include <starrobot_msgs/Crash.h>
#include <starrobot_msgs/Fall.h>
#include <starrobot_msgs/Imu.h>
#include <starrobot_msgs/Infrared.h>
#include <starrobot_msgs/Key.h>
#include <starrobot_msgs/PID.h>
#include <starrobot_msgs/PowerKey.h>
#include <starrobot_msgs/Servo.h>
#include <starrobot_msgs/Sonar.h>
#include <starrobot_msgs/Velocities.h>
#include <starrobot_msgs/Encoder.h>
#include <starrobot_msgs/info_show.h>
#include <std_msgs/Float32.h>
#include <std_msgs/Int16.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <chrono>
#include <ros/callback_queue.h>
#include <ros/time.h>
class starrobot_bringup
{
	public:
		starrobot_bringup();
		~starrobot_bringup();
		void base_InitParam();  		
		serial::Serial Robot_Serial; //声明串口对象 
		void ReadFormUart(void);
	private:
		boost::mutex write_mutex_;
		boost::mutex read_mutex_;
		int baud_data;
		std::string usart_port;
		uint8_t RecBuff[512];
		int RecLength;
};


#endif


